<?php

	global  $gn_tab_id;

	//  get functions
	require( dirname(__FILE__) . '/tab_panel.php' );

	$body_color					= get_option( 'gn_body_color' );
	$body_background		= get_option( 'gn_body_background' );
	$wrapper_background	= get_option( 'gn_wrapper_background' );

	global 	$tab_feature_b1,
	 	      $tab_feature_b2,
  	      $tab_count_b1,
    	    $tab_count_b2,
					$tab_b1_titles,
					$tab_b2_titles,
					$panel_1_active_tab_id,
					$panel_2_active_tab_id;

	global  $wp_registered_sidebars;

  echo '<div id="bottom_container">';
	echo '<div id="sidebar_b1" style="background:' . $wrapper_background . ';">';

	if  ( $tab_feature_b1 == 'on' )
	{
	  print_tab_panel_1($panel_1_active_tab_id);
	}
	else
	{
		echo '<ul class="sidebar_b1_ul">';
				/* Widgetized sidebar, if you have the plugin installed. */
				if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom_Menu_1') ) :
 	    		echo '<ul> </ul>';
				endif;
		echo '</ul>';
	}

	echo	'</div>';


	echo	'<div id="sidebar_b2" style="background:<?php echo $wrapper_background; ?>;">';


	if  ($tab_feature_b2 == 'on')
	{
	  print_tab_panel_2($panel_2_active_tab_id);
	}
	else
	{
		echo '<ul class="sidebar_b2_ul">';
		
		//	calculate sidebar id
	  $id = count($wp_registered_sidebars);

		/* Widgetized sidebar, if you have the plugin installed. */
		if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Bottom_Menu_2') ) :
  		echo '<ul> </ul>';
		endif;

		echo '</ul>';
	}


	echo	'</div>';
	echo  '</div>';

?>